package com.gjy.sb.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @author 宫静雨
 * @version 1.0
 * @since 2023-08-31 16:01:52
 */
@Aspect
@Order(1)
@Component
public class LogAspectJ {

    private static final Logger log = LoggerFactory.getLogger(LogAspectJ.class);

    @Pointcut("execution(public * com.gjy.sb.service..*.*(..))")
    public void b() {
    }

    //@Around(value = "@annotation(LogAspect)")
    @Around(value = "b()")
    public Object around(ProceedingJoinPoint point) throws Throwable {
        log.info("AOP");
        return point.proceed();
    }
}
